import requests from '../config/request.js'

//获取客房类型列表
// export const searchGuestRoomTypeList = (payload) => {
//     return requests.httpTokenRequest({
//         url: "XyGuestRoom/SearchXyGuestRoomList",
//         data:payload
//     });
// };


//根据门店标识获取门店客房类型
export const searchXyStoreGuestRoomListByStoreAlias = (payload) => {
    return requests.httpTokenRequest({
        url: "XyGuestRoom/SearchXyStoreGuestRoomListByStoreAlias",
        data:payload
    });
};

//获取客房价格
export const getStoreRoomNumber = (payload) => {
    return requests.httpTokenRequest({
        url: "XyGuestRoom/GetStoreRoomNumber",
        data:payload
    });
};


//获取客房价格
export const getXyStoreGuestRoomPrice = (payload) => {
    return requests.httpTokenRequest({
        url: "XyGuestRoom/GetXyStoreGuestRoomPrice",
        data:payload
    });
};


//提交客房订单
// export const submitXyGuestRoom = (payload) => {
//     return requests.httpTokenRequest({
//         url: "XyGuestRoom/SubmitXyGuestRoom",
//         data:payload
//     });
// };

// export const getMyXyGuestRoomOrderList = (payload) => {
//     return requests.httpTokenRequest({
//         url: "XyGuestRoom/GetMyXyGuestRoomOrderList",
//         data:payload
//     });
// };

// export const cancelXyGuestRoomOrder = (payload) => {
//     return requests.httpTokenRequest({
//         url: "XyGuestRoom/CancelXyGuestRoomOrder",
//         data:payload
//     });
// };

// export const guestXyRoomOrderRefund = (payload) => {
//     return requests.httpTokenRequest({
//         url: "XyGuestRoom/GuestXyRoomOrderRefund",
//         data:payload
//     });
// };

//获取客房退款配置信息
export const searchXyStoreRoomConfig = (payload) => {
    return requests.httpTokenRequest({
        url: "XyGuestRoom/SearchXyStoreRoomConfig",
        data:payload
    });
};


//获取客房配置说明信息
export const searchAllXyStoreRoomExplain = (payload) => {
    return requests.httpTokenRequest({
        url: "XyGuestRoom/SearchAllXyStoreRoomExplain",
        data:payload
    });
};

//获取客房优惠券
export const getGuestRoomCoupons = (payload) => {
	return requests.httpTokenRequest({
		url: "XyGuestRoom/GetGuestRoomNewCoupons",
		data: payload
	});
};
// *********************************
export const getMyXyGuestRoomOrderList = (payload) => {
	 return requests.requestAll("/client/room/roomOrderList",'post',payload,false);
};
// 获取客房门店
// export const searchGuestRoomTypeList = (payload) => {
// 	 return requests.requestAll("/client/room/list",'post',payload,false);
// };
export const searchGuestRoomTypeList = (payload) => {
	 return requests.requestAll("/client/room/xingyunList",'get',payload,true);
};
// 详情
// export const queryRoomByStoreId = (payload) => {
// 	 return requests.requestAll("/client/room/queryRoomByStoreId",'post',payload);
// };
export const queryRoomByStoreId = (payload) => {
	 return requests.requestAll("/client/room/queryStoreRoomByStoreAlias",'get',payload);
};

// 店铺id
export const shopStoreId = () => {
	 return requests.requestAll("/system/dept/list-all-simple-store",'get');
};

// 转换星云店铺id
export const shopRoomByStoreId = (payload) => {
	 return requests.requestAll("/system/dict-data/getXingYunStoreId",'get',payload);
};

// 店铺详情用星云id
export const getGuestRoomDelData = (params) => {
	 return requests.requestAll("https://jiudian.xingyunol.com/p/cooperation/v1/store",'get',params);
	
};







// 客房取消订单
export const cancelXyGuestRoomOrder = (payload) => {
    return requests.requestAll("/client/pay/orderCancel",'post',payload,false);
};
// 客房订单退款
export const guestXyRoomOrderRefund = (payload) => {
	return requests.requestAll("/client/pay/applyOrCancelRefund",'get',payload);
   
};


//提交客房订单
export const submitXyGuestRoom = (payload) => {
  return requests.requestAll("/client/room/submitRoom",'post',payload,false);
};
